#pragma once

namespace ui
{
	enum COMBO_LIST_STYLE
	{
		COMBO_LIST_STYLE_NONE = 0,
		COMBO_LIST_STYLE_PAGING = 0x0001,
		COMBO_LIST_STYLE_MUTILSEL = 0x0002,
		COMBO_LIST_STYLE_IMAGE = 0x0004,
	};

	/*class kvItemCombo :public kvItem {
	public:
		bool Filter(const std::wstring& filter, bool ignoreCase) const{
			if (filter.empty())
				return true;
			std::wstring sValue = ignoreCase ? StringHelper::MakeLowerString(v) : v;
			return sValue.find(filter) != std::wstring::npos;
		}
	};*/

	class ComboListWnd;
	class UILIB_API ComboListElement : public ui::ListContainerElement
	{
	public:
		ComboListElement(ComboListWnd *pListWnd) : m_pListWnd(pListWnd){};
		virtual ~ComboListElement(){};
	protected:
		virtual void Init() override;
		virtual void PaintText(IRenderContext* pRender) override{ return; };

	public:
		virtual void SetText(const std::wstring& strText) override;
		virtual std::wstring GetText() const override;
	
		void SetImage(std::wstring sImg);
	protected:
		ui::CheckBox	*m_pCheck{ nullptr };
		ui::Control		*m_pImage{ nullptr };
		ui::Label		*m_pLabel{ nullptr };

		ComboListWnd	*m_pListWnd{ nullptr };

		bool			m_bSelect{ false };
		std::wstring	m_sImg;
	};

} // namespace ui

